<?php



      header("Content-Type: text/html;charset=utf-8"); 

       require "../gobal.php";

       $oid=$_GET["oid"];

       $sql="select * from order_sum_detail where id=$oid";

       $order_sums=fetch_rows($sql);
       $order_sum=$order_sums[0];
       $device_colorName=getColorName($order_sum["device_color"]);
       $seviceName=getServiceName($order_sum["service_method"]);
?>

<div class="navbar">
  <div class="navbar-inner">
    <!--<div class="left sliding"><a href="/" class="link icon-only no-animation"><i class="icon icon-home"></i></a></div> -->
    <div class="center sliding">完成订单</div>
    <div class="right"><a href="customer/center.php" class="link icon-only"><i class="icon icon-user"></i></a></div>
  </div>
</div>
<div class="pages navbar-through">
  <div data-page="order-success-page" class="page">
    <div class="page-content" style="padding-bottom:40px;">
      
          <div class="success-msg-tip"><i class="icon icon-success"></i> <div style="line-height:42px;">您的订单已受理成功</div></div>

          <div class="success-order-info" style=" margin:15px; padding:0 15px; background:#fff; border:1px solid #ddd;">
			  <?php
               $content="<p>订单号:".$order_sum["code"]."</p>"
               ."<p>下单时间：".$order_sum["created_at"]."</p>"
               ."<p>设备机型：".$order_sum["device_name"]." $device_colorName</p>"
               ."<p>手机故障:".$order_sum["remark"]."</p>"
               ."<p>预估金额：".$order_sum["total_price"]."</p>"
               ."<p>服务类型：$seviceName</p>";
               switch($order_sum["service_method"]){

				   case "express":
				   $content.="<p>快递单号:".$order_sum["express_code"]."</p>"
					   ."<p>发件人:".$order_sum["express_sender_name"]."</p>"
					   ."<p>寄回地址:".$order_sum["express_sender_address"]."</p>"
					   ."<p>联系电话:".$order_sum["express_sender_tel"]."</p>"

					   ;
				   break;
                   case "visit":
				   $content.="<p>联系人:".$order_sum["visit_contact_realname"]."</p>"
					   ."<p>手机号:".$order_sum["visit_contact_tel"]."</p>"
					   ."<p>详细地址:".$order_sum["visit_contact_address"]."</p>"
                        ."<p>上门时间:".$order_sum["visit_arrive_at"]."</p>"
					   ;

				   break;
			   }

               $title="维修下单:".$order_sum["code"];
               echo $content;

                $content.="<p><a href='".getBasePath()."/admin/center-frame.php' >点击查看</a></p>";
	            sendEmailToAdmin($title,$content);
		      ?>
			  <!--
                 <p>下单时间：2016-05-15 10:39:06</p>
              <p>订单类型：手机维修</p>

              <p>手机故障：边框 更换电池 主板漏电需检测 电源键 静音键 </p>
              <p>预估金额：￥669.00</p>
                  <p>服务类型：上门维修</p>
                  <p>上门时间：今天  随时</p>
               -->
          </div>

          <div class="" style=" text-align:center; color:#999;">
            <p>请保持电话畅通，以便工程师联系您</p>
            <p style=" font-size:12px;">客服电话：4000574380</p>
          </div>
      
          <a  href="payment/order-history.php" class="button button-fill btn-confirm-order no-animation" data-ignore-cache="true">查看订单详情</a>

          <div class="" style=" text-align:center; color:#999;">
          </div>

          

    </div>
  </div>
</div>
